// pages/detail/detail.js
Page({

  /**
   * 页面的初始数据
   */
  data: {
    visible2: false,
    goodsNum:1
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {

  },

  open2() {
    this.setData({
      visible2: true,
    })
  },
  onClose2() {
    this.setData({
      visible2: false,
    })
  },
  goodsNum(e){
    this.setData({
      goodsNum:e.detail.value
    })
    
  },
  buyFnc(e){
    console.log(this.data.goodsNum)
  },
  chooseAdders(){
    wx.chooseAddress({
      success (res) {
        console.log(res.userName)
        console.log(res.postalCode)
        console.log(res.provinceName)
        console.log(res.cityName)
        console.log(res.countyName)
        console.log(res.detailInfo)
        console.log(res.nationalCode)
        console.log(res.telNumber)
      }
    })
  }
 
})